接續昨天的繼續說明
cmath.log10(x)
x
的以 10 為基數的對數。cmath.log10(x)
x
(complex): 要計算對數的複數。x
的以 10 為基數的對數。import cmath
x = 1 + 1j
print(cmath.log10(x)) # 輸出: (0.15082288918503002+0.34102985847404205j)
cmath.sqrt(x)
x
的平方根。cmath.sqrt(x)
x
(complex): 要計算平方根的複數。x
的平方根。import cmath
x = 1 + 1j
print(cmath.sqrt(x)) # 輸出: (1.09868411346781+0.45508986056222733j)
cmath.acos(x)
x
的反餘弦值。cmath.acos(x)
x
(complex): 要計算反餘弦值的複數。x
的反餘弦值。import cmath
x = 0.5 + 0.5j
print(cmath.acos(x)) # 輸出: (1.0471975511965976-0.5493061443340549j)
cmath.asin(x)
x
的反正弦值。cmath.asin(x)
x
(complex): 要計算反正弦值的複數。x
的反正弦值。import cmath
x = 0.5 + 0.5j
print(cmath.asin(x)) # 輸出: (0.5235987755982989+0.522403162740893j)
cmath.atan(x)
x
的反正切值。cmath.atan(x)
x
(complex): 要計算反正切值的複數。x
的反正切值。import cmath
x = 0.5 + 0.5j
print(cmath.atan(x)) # 輸出: (0.42135784268312316+0.47106582069495145j)
cmath.cos(x)
x
的餘弦值。cmath.cos(x)
x
(complex): 要計算餘弦值的複數。x
的餘弦值。import cmath
x = 0.5 + 0.5j
print(cmath.cos(x)) # 輸出: (0.7539022543433046+0.6650933935378997j)